/**
 * 
 */
package org.abrysov.android.lombarditems.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * @author Alexander Brysov
 *
 */
public class LombardData extends SQLiteOpenHelper {

	public LombardData(Context context) {
		super(context, "lombard.db", null, 5);
		
	}

	/* (non-Javadoc)
	 * @see android.database.sqlite.SQLiteOpenHelper#onCreate(android.database.sqlite.SQLiteDatabase)
	 */
	@Override
	public void onCreate(SQLiteDatabase db) {
		
		db.execSQL("CREATE TABLE timerecords "
								+ "id INTEGER PRIMARY KEY, time TEXT, notes TEXT ");
		
	}

	/* (non-Javadoc)
	 * @see android.database.sqlite.SQLiteOpenHelper#onUpgrade(android.database.sqlite.SQLiteDatabase, int, int)
	 */
	@Override
	public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {

		db.execSQL("DROP TABLE IF EXISTS timerecords");
		onCreate(db);
		
	}

}
